<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>

<xsl:template match="/">
<html>
  <body>
   <center>
		<h1>Результат параметрической адаптации</h1>
   </center>
   <br/>
   <h2>Общие сведения</h2>
    <table border="1">
      <tr bgcolor="#9acd32">
        <th rowspan="2">Дата</th>
        <th rowspan="2">Кол. эксп.</th>
        <th rowspan="2">Метод</th>
        <th colspan="3">Конфигурация</th>
        <th rowspan="2">Алгоритм</th>
        <th rowspan="2">Общий размер файлов (байт)</th>
	  </tr>
	  <tr>
		    <th>CPU</th>
		    <th>HDD</th>
		    <th>RAM</th>
	 </tr>
	  <xsl:for-each select="Result">
        <tr>
            <td><xsl:value-of select="Date1"/></td>
            <td><xsl:value-of select="ExperimentCount1"/></td>
            <td><xsl:value-of select="MethodName1"/></td>
            <td><xsl:value-of select="Config/Processor"/></td>
            <td><xsl:value-of select="Config/Hdd"/></td>
            <td><xsl:value-of select="Config/Memory"/></td>
            <td><xsl:value-of select="AlgName1"/></td>
            <td rowspan="2"><xsl:value-of select="AllSize"/></td>
        </tr>
	  </xsl:for-each>
        
     <xsl:for-each select="Result">
	  <tr>
        <td><xsl:value-of select="Date2"/></td>
        <td><xsl:value-of select="ExperimentCount2"/></td>
        <td><xsl:value-of select="MethodName2"/></td>
        <td><xsl:value-of select="Config/Processor"/></td>
        <td><xsl:value-of select="Config/Hdd"/></td>
        <td><xsl:value-of select="Config/Memory"/></td>
        <td><xsl:value-of select="AlgName2"/></td>
	  </tr>
	  </xsl:for-each>
    </table>
      
	<br/>
	<h2>Выборка файлов</h2>
	<table border="1">
      <tr bgcolor="#9acd32">
        <th colspan="2">Файл(ы)</th>
      </tr>
	  <tr bgcolor="#9acd32">
		<th>Имя</th>
        <th>Размер (байт)</th>
        <th>Метод</th>
        <th>Алгоритм</th>
        <th>Время выпол. адапт.</th>
        <th><br>Р-р архива</br>
            <br>с рек. пар-ми</br></th>
        <th><br>Р-р архива с</br>
            <br>подобр. пар-ми</br></th>
        <th>Sup время</th>
        <th>Sup исп. файла </th>
        <th>Reg время</th>
        <th>Reg исп. файла</th>
      </tr>
	  <xsl:for-each select="Result">
	  <tr>
		<xsl:for-each select="Files/File">
		<tr>
            <td rowspan="2"><xsl:value-of select="Name"/></td>
            <td rowspan="2"><xsl:value-of select="Real_size1"/></td>
            <td><xsl:value-of select="MethodName1"/></td>
            <td><xsl:value-of select="AlgName1"/></td>
            <td><xsl:value-of select="ElapsedTime1"/></td>
            <td><xsl:value-of select="Recommended_size1"/></td>
            <td><xsl:value-of select="Best_size1"/></td>
            <td><xsl:value-of select="Sup_time1"/></td>
            <td><xsl:value-of select="Sup_compression1"/></td>
            <td><xsl:value-of select="Reg_time1"/></td>
            <td><xsl:value-of select="Reg_compression1"/></td>
		</tr>
        <tr bgcolor="#F0FFFF">
            <td><xsl:value-of select="MethodName2"/></td>
            <td><xsl:value-of select="AlgName2"/></td>
            <td><xsl:value-of select="ElapsedTime2"/></td>
            <td><xsl:value-of select="Recommended_size2"/></td>
            <td><xsl:value-of select="Best_size2"/></td>
            <td><xsl:value-of select="Sup_time2"/></td>
            <td><xsl:value-of select="Sup_compression2"/></td>
            <td><xsl:value-of select="Reg_time2"/></td>
            <td><xsl:value-of select="Reg_compression2"/></td>

        </tr>
		</xsl:for-each>
	  </tr>
	  </xsl:for-each>
	</table>
	<br/>
      
    <table border="1">
      <tr bgcolor="#9acd32">
          <xsl:for-each select="Result">
        <th colspan="3"> Параметры (<xsl:value-of select="AlgName2"/>)</th>
          </xsl:for-each>
      </tr>
	  <tr>
		<th>Имя</th>
    <th>Рекомендуемое</th>
		<th>Найденное</th>
	  </tr>
	  <xsl:for-each select="Result">
	  <tr>
		<xsl:for-each select="Parameters2/Parameter2">
		<tr>
			<td><xsl:value-of select="Name2"/></td>
      <td><xsl:value-of select="Default2"/></td>
			<td><xsl:value-of select="Value2"/></td>
		</tr>
		</xsl:for-each>
	  </tr>
	  </xsl:for-each>
	</table>
      
  </body>
  </html>
 </xsl:template>
</xsl:stylesheet>